package com.atguigu03.date.jdk8;

import org.hamcrest.Condition;

import java.util.Scanner;

/**
 * ClassName: test1
 * Package: com.atguigu03.date.jdk8
 * Description:
 *
 * @Author BuTang
 * @Create 2023/5/24 18:49
 * @Version 1.0
 */
public class test1 {
    public static void main(String[] args) {
        Scanner sca = new Scanner(System.in);
        System.out.println("输入");
        int i = sca.nextInt();

            if ( i == 1) {
                try {
                    throw new myExction("不能为1");
                } catch (myExction e) {
                    System.out.println("*******");;
                }

            }
        System.out.println("正确");
    }
}

class myExction extends Exception{
    public myExction(String message) {
        super(message);
    }

    public myExction() {
    }

    static final long serialVersionUID = -338124229948L;

    @Override
    public String toString() {
        return super.toString();
    }
}
